import React from 'react'
import { Col, Row } from 'antd';
import "../index.less"

export default function DetailsCommodity({ info }: any) {
    return (
        <div className='detailsCommodity'>
            <Row style={{marginBottom:"40px"}}>
                {
                    info.detail ?
                        Object.keys(info.detail).map((item, index) => {
                            return (
                                <Col span={8} key={index}>
                                    <span className='span_details_commodity'>{item}: {info.detail[item]}</span>
                                </Col>
                            );
                        }) : ""
                }
            </Row>
            <Row>
                {
                    info.detailIMG ?
                        info.detailIMG.map((item: any, index: number) => {
                            return (
                                <img key={index} src={item} alt="" />
                            )
                        })
                        : ""
                }
            </Row>
        </div>
    )
}
